package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.EcdBuyMapper;
import com.ruoyi.system.domain.EcdBuy;
import com.ruoyi.system.service.IEcdBuyService;

/**
 * 外购Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-06
 */
@Service
public class EcdBuyServiceImpl implements IEcdBuyService 
{
    @Autowired
    private EcdBuyMapper ecdBuyMapper;

    /**
     * 查询外购
     * 
     * @param id 外购主键
     * @return 外购
     */
    @Override
    public EcdBuy selectEcdBuyById(Long id)
    {
        return ecdBuyMapper.selectEcdBuyById(id);
    }

    /**
     * 查询外购列表
     * 
     * @param ecdBuy 外购
     * @return 外购
     */
    @Override
    public List<EcdBuy> selectEcdBuyList(EcdBuy ecdBuy)
    {
        return ecdBuyMapper.selectEcdBuyList(ecdBuy);
    }

    /**
     * 新增外购
     * 
     * @param ecdBuy 外购
     * @return 结果
     */
    @Override
    public int insertEcdBuy(EcdBuy ecdBuy)
    {
        return ecdBuyMapper.insertEcdBuy(ecdBuy);
    }

    /**
     * 修改外购
     * 
     * @param ecdBuy 外购
     * @return 结果
     */
    @Override
    public int updateEcdBuy(EcdBuy ecdBuy)
    {
        return ecdBuyMapper.updateEcdBuy(ecdBuy);
    }

    /**
     * 批量删除外购
     * 
     * @param ids 需要删除的外购主键
     * @return 结果
     */
    @Override
    public int deleteEcdBuyByIds(Long[] ids)
    {
        return ecdBuyMapper.deleteEcdBuyByIds(ids);
    }

    /**
     * 删除外购信息
     * 
     * @param id 外购主键
     * @return 结果
     */
    @Override
    public int deleteEcdBuyById(Long id)
    {
        return ecdBuyMapper.deleteEcdBuyById(id);
    }
}
